home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir39
/
escv20.zip
/
ESC.DOC
next >
Wrap
Text File
|
1993-03-28
|
11KB
|
237 lines
ESC
Written by
Craig Brauckmiller
March 28, 1993
Legal Stuff
=============================================================================
This program is shipped as is. I do not make any guarantees to the file's
integrity at the time of execution. I will not be liable to any damage
caused by this program (like this program will do that). Below is some
information about the file ESC.EXE
This program is shareware. If you like it, feel free to make a donation
of $10. The address info is at the end of this file.
If you have a copy of McAfee's Validate program, run it on ESC.EXE. Below
are the values that the file had at the time it was zipped. If they
are different, then the file may be damaged or may have been tampered with.
If the values are different then these listed, delete the files and
re-download it. It would also be a good idea to run McAfee's SCAN program
on it to check for viruses.
File Name: ESC.EXE
Size: 16,064
Date: 3-28-1993
File Authentication:
Check Method 1 - 3B29
Check Method 2 - 0158
OVERVIEW
=============================================================================
This program was written for the sole purpose of sending printer
ESCape codes from the DOS prompt. This makes it ideal for use
in DOS batch files to set certain attributes on the printer.
The program will work on dot matrix and laser printers. For a detailed
list of control codes, consult your printer user's manual first.
For instance, if you have an older package that does not have a printer
selection, you can create a batch file that sends the commands to the
printer before the application is executed.
How it works.
At a DOS prompt, type ESC followed by the escape sequence of your choice.
This program is not designed to check your escape codes for validity, it
is only a tool to pass your information on to the printer.
A very important note, most escape codes are case sensitive. This means that
if the code requires a lower case "e" then you must type a lower case "e".
This program was designed to run on LPT1, LPT2 and LPT3 only. It will also
work if you have your printer attached serially and have DOS redirect the
LPT port to the COM port that your printer is attached to.
SWITCHES
=============================================================================
This program has several optional switches to make life a little easier.
When switches are used, a space must precede and follow the switch to
separate it from the rest of the escape sequence. You may use up to 9
command line switches.
/H or /? - These switches are used to bring up the on-line help
This switch will terminate the program immediately.
Any switch following it will not be recognized or
executed.
ESC /H
ESC /?
ESC
/EXAMPLE - This switch will display a screen of examples.
This switch will terminate the program immediately.
Any switch following it will not be recognized or
executed.
ESC /EXAMPLE
/REGISTER - This switch will display a registeration screen.
This switch will terminate the program immediately.
Any switch following it will not be recognized or
executed.
ESC /REGISTER
\ - This switch tells the program that a decimal value is
to follow. You would use this when an escape sequence
requires a decimal value. An example would be
the ESC k command for the Epson Dot Matrix printers.
This is the command to choose the different type faces
available on the printer.
ESC k \4
This command would select the script font on 24 pin
printers.
If a non-numeric character is sent after the \, the program
will simply ignore the code. However, if the \ is used in
conjunction with the /PRINTxx switch, the value after the
\ will be treated as a file name.
ESC /PRINT \AUTOEXEC.BAT - This will print the AUTOEXEC.BAT
file located in the root directory.
/S - This switch is used to suppress the sending of the
escape character. In the Epson Dot Matrix Language,
there are a few codes that do not work when they are
preceded with the escape character. An example is
the Cancel Condense command (Decimal 18). To send this
command, type the following:
ESC /S \18
NOTE: This command will suppress the sending of the ESC code
for the entire line. If you need to send an ESC code,
you would have to use \27 in front of whatever you
wanted to send.
/PSxx - This switch will allow you to print the current screen.
The program uses DOS interrupt 5h to invoke the print
screen function. The variable xx refers to the number of
seconds for ESC to wait before processing the next command
line switch. This is especially handy for slower dot matrix
printers. If you try to send another code immediately following
this switch, the printer will be busy printing the scren and
the program will terminate operation with a PRINTER BUSY error.
A value of 10 for xx is usually sufficient for even the slowest
dot matrix printers. You really wouldn't need to use the xx
variable on laser printers. This command will only work on
LPT1. There is no easy way to redirect a print screen to
any other LPT port.
ESC /PS /FF - Print screen and issue form feed immediately.
ESC /PS10 /FF - Print screen, wait 10 seconds and then issue
the form feed.
/FFxx - This switch will cause the printer to form feed to the
next top of form. This command is an excellent tool
for testing the Short Tear Off functions available on
Epson Dot Matrix printers. The variable xx refers to the
parallel port that you wish to send the form feed to. If
no number is used, the program will default to LPT1.
ESC /FF - Issue form feed to LPT1.
ESC /FF3 - Issue form feed to LPT3.
/HWxx - This switch will send a hardware reset code to the printer.
The printer will act as if it were just powered on. This
switch is extremely helpful if your printer appears to
lock up. The program uses DOS interrupt 17h, function 1h
to invoke the reset function. The variable xx designates
the parallel port to send the reset code. If no number is
given, the program defaults to LPT1. The program will
wait 3 seconds before it will process the next switch.
This will give your dot matrix printer a chance to home
itself.
ESC /HW - Send hardware reset to LPT1
ESC /HW2 - Send hardware reset to LPT2
/STxx - This switch will display the current status of the parallel port.
The program will return on of the following status conditions.
The variable xx refers to the parallel port from which the program
is to return the status. If no value is specified, the program
will default to LPT1.
ESC /ST - Get port status for LPT1
ESC /ST3 - Get port status for LPT3
Printer is READY
Printer is BUSY
Printer is OUT OF PAPER
Printer is OFF LINE or is TURNED OFF
Printer has an UNKNOWN ERROR
/PRINTxx fname.txt - Used to print any ASCII text files to the printer.
fname.txt is the file that you wish to print.
xx is the port number. If no value for xx is entered
the program will default to LPT1.
IMPORTANT NOTE: The file name MUST follow the
/PRINT command immediately. The program looks at
the next command line entry for the file name. If
you do not enter a file name, the program will use
the next command line switch as the file name and
probably terminate with the error: `` was not found.
ESC /PRINT ESC.PAS - Print the file ESC.PAS to LPT1.
ESC /PRINT3 ESC.PAS - Print the file ESC.PAS to LPT3.
/LPTxx - Specify the parallel port to send the ESC sequene.
NOTE: This command only applies to the actual ESC sequence.
This switch does not apply to any other command switch.
xx is the port number. If no value is entered for xx, the
program defaults to LPT1.
ESC /LPT2 @ - Send ESC @ to the printer on LPT2.
ESC /LPT3 @ /FF3 - Send ESC @ to the printer on LPT3 and
issue a form feed to the printer on
LPT3.
The command line switches are not case sensitive, they may be entered in
either upper case or lower case. You may combin any combination of switches
unless otherwise specified.
BATCH FILES
=============================================================================
If you decide to run this program from a DOS batch file, the program will
terminate with either error level 0 for a normal program execution or
an error level 1 for abnormal program termination. This version of the
program will only exit with an error level 1 if the printer is not ready
or some type of printer error occurred.
It would be a good idea to place this program in your DOS directory or
a sub-directory that is in the PATH. It will make program execution
a lot easier.
If you find this program useful, please send a donation of $10 to:
Craig Brauckmiller
911 W. Lincoln #320
Montebello, CA 90640 USA
I may also be reached on CompuServe at the following ID #.
CompuServe ID : 73627,1377
If you have any functions that you would like to see added to the program,
feel free to drop me a note and I'll see what I can do.